<template>
    <Header></Header>
    <NavSwiper></NavSwiper>
    <NewGoodCourse></NewGoodCourse>
    <!-- <div ref="target">
		<NewGoodCourse v-if='targetIsVisible'></NewGoodCourse>
	</div> -->
    <Foot></Foot>
</template>

<script setup>
 import { useIntersectionObserver } from '@vueuse/core'
 import Header from '../components/common/Header.vue';
 import NavSwiper from '../components/home/NavSwiper.vue';
 import NewGoodCourse from '../components/home/NewGoodCourse.vue';

 //按需引入异步组件
 /* const NewGoodCourse = defineAsyncComponent(() =>
  import('../components/home/NewGoodCourse.vue')
 )
 const target = ref(null);
 const targetIsVisible = ref(false);

 const { stop } = useIntersectionObserver(
  target,
  ([{ isIntersecting }]) => {
  	if( isIntersecting ) {
  		targetIsVisible.value = isIntersecting
  	}
  },
 ) */
 import Foot from '../components/common/Foot.vue';
</script>